<%@page language="java" contentType="text/html; charset=utf-8"%>
<%@include file="/commons/inc.jsp" %>
<script type="text/javascript" src="${contextPath}/js/sdmenu.js"></script>
<script>
var myMenu;
window.onload = function(){
	myMenu = new SDMenu("my_menu");
	myMenu.init();
	var div = document.getElementById("my_menu").getElementsByTagName("div");
	for(var i = 0; i < div.length; i++ ){     
		div[i].className="collapsed";
	}

	document.getElementById("hosipitalMenu").className="";
	try{
	var evt = document.createEvent('HTMLEvents');
    evt.initEvent('click',true,true);
    element = document.getElementById("hosipitalMenu");
    element = document.getElementById("menu11");
    element.dispatchEvent(evt);
	}catch(e){
		document.getElementById("menu11").click();
	}
}

function changeSelected(obj){
	var ahref = document.getElementById("my_menu").getElementsByTagName("a");
	for(var i = 0; i < ahref.length; i++ ){         
		ahref[i].className="";
	}
   obj.className="current";
}

function clickLink(linkid) {
	var link=document.getElementById(linkid);
	var cancelled = false;
	if (document.createEvent) {
		var event = document.createEvent("MouseEvents");
		event.initMouseEvent("click", true, true, window,
				0, 0, 0, 0, 0,
				false, false, false, false,
				0, null);
		cancelled = !link.dispatchEvent(event);
	}
	else if (link.fireEvent) {
		cancelled = !link.fireEvent("onclick");
	}         
//	if (!cancelled) {
//		window.location = link.href;       
//	}   
}  
</script>

<div id="container">
  <div id="my_menu" class="sidebar">
  	  <div id='hosipitalMenu' onclick="clickLink('menu11');">
  	  	<span class="lay_menu">医院信息</span>
	  	<a href='${contextPath}/group/group.action?method=query' target="contentFrame" id="menu11" onClick="changeSelected(this)" style="display:none;">课题组</a>
	  </div>
	  
	  <div id='patientMenu' onclick="clickLink('menu21');">
	  	<span class="lay_menu">患者信息</span>
	  	<a href='${contextPath}/patient/patient.action?method=query' target="contentFrame" id="menu21" onClick="changeSelected(this)" style="display:none;">患者信息</a>
	  	
	  </div>
	  
	  <div id='followMenu'>
	  <span class="lay_menu">数据管理</span>
	  	<a href='${contextPath}/search/search.action?method=query' target="contentFrame" id="menu22" onClick="changeSelected(this)" >数据检索</a>
	  	<a href='${contextPath}/data/data.action?method=exData' target="contentFrame" id="menu31" onClick="changeSelected(this)" >数据导出</a>
	  	<a href='${contextPath}/data/data.action?method=imData' target="contentFrame" id="menu32" onClick="changeSelected(this)" >数据导入</a>
	  </div>
  </div>
</div>
<!-- 
<div id="container">
  <div id="my_menu" class="sidebar">
  	  <div id='hosipitalMenu'>
	  <span class="lay_menu">医院信息管理</span>
	  	<a href='${contextPath}/group/group.action?method=query' target="contentFrame" id="menu11" onClick="changeSelected(this)" >课题组</a>
	  </div>
	  
	  <div id='patientMenu'>
	  <span class="lay_menu">患者信息管理</span>
	  	<a href='${contextPath}/patient/patient.action?method=query' target="contentFrame" id="menu21" onClick="changeSelected(this)" >患者信息</a>
	  	<a href='${contextPath}/search/search.action?method=query' target="contentFrame" id="menu22" onClick="changeSelected(this)" >数据检索</a>
	  </div>
	  
	  <div id='followMenu'>
	  <span class="lay_menu">数据管理</span>
	  	<a href='${contextPath}/data/data.action?method=exData' target="contentFrame" id="menu31" onClick="changeSelected(this)" >数据导出</a>
	  	<a href='${contextPath}/data/data.action?method=imData' target="contentFrame" id="menu32" onClick="changeSelected(this)" >数据导入</a>
	  </div>
  </div>
</div> 
-->
